package com.zchlwj;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;
import java.rmi.server.RMISocketFactory;

public class ServerMain {

    public static void main(String[] args) throws Exception {
        LocateRegistry.createRegistry(8802);
        RMISocketFactory.setSocketFactory(new CustomeSocketFactory());
        HelloService helloService =new HelloServiceImpl();
        Naming.bind("rmi://localhost:8802/helloService", helloService);
        System.out.println( "ServiceMain provide RPC service now");
    }
}
